<?php namespace App;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * App\UserAddress
 *
 * @property integer $id 地址标识
 * @property integer $user_id 用户标识
 * @property string $consignee 收件人
 * @property string $province 省份
 * @property string $city 城市
 * @property string $area 地区
 * @property string $add_detail 详细地址
 * @property string $postcode 邮政编码
 * @property string $mobilephone 手机号
 * @property string $telephone 固定电话号码
 * @property integer $is_default 是否默认地址，0：否，1：是
 * @property string $deleted_at
 * @property \Carbon\Carbon $created_at
 * @property \Carbon\Carbon $updated_at
 * @method static \Illuminate\Database\Query\Builder|\App\UserAddress whereId($value)
 * @method static \Illuminate\Database\Query\Builder|\App\UserAddress whereUserId($value)
 * @method static \Illuminate\Database\Query\Builder|\App\UserAddress whereConsignee($value)
 * @method static \Illuminate\Database\Query\Builder|\App\UserAddress whereProvince($value)
 * @method static \Illuminate\Database\Query\Builder|\App\UserAddress whereCity($value)
 * @method static \Illuminate\Database\Query\Builder|\App\UserAddress whereArea($value)
 * @method static \Illuminate\Database\Query\Builder|\App\UserAddress whereAddDetail($value)
 * @method static \Illuminate\Database\Query\Builder|\App\UserAddress wherePostcode($value)
 * @method static \Illuminate\Database\Query\Builder|\App\UserAddress whereMobilephone($value)
 * @method static \Illuminate\Database\Query\Builder|\App\UserAddress whereTelephone($value)
 * @method static \Illuminate\Database\Query\Builder|\App\UserAddress whereIsDefault($value)
 * @method static \Illuminate\Database\Query\Builder|\App\UserAddress whereDeletedAt($value)
 * @method static \Illuminate\Database\Query\Builder|\App\UserAddress whereCreatedAt($value)
 * @method static \Illuminate\Database\Query\Builder|\App\UserAddress whereUpdatedAt($value)
 * @mixin \Eloquent
 * @property-read \App\User $user
 * @method static bool|null forceDelete()
 * @method static \Illuminate\Database\Query\Builder|\App\UserAddress onlyTrashed()
 * @method static bool|null restore()
 * @method static \Illuminate\Database\Query\Builder|\App\UserAddress withTrashed()
 * @method static \Illuminate\Database\Query\Builder|\App\UserAddress withoutTrashed()
 */
class UserAddress extends Model
{
    protected $table='user_address';
    use SoftDeletes;

    public function user(){
        return $this->belongsTo('App\User','user_id');
    }
}